/**
 * Title: SignatureUtil.java
 * Description:
 * author: kotomifi
 * date: Jul 27, 2014
 * ©2014 apping 社区
 */
package com.apping.demo.bbs.utils;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

/**
 *
 */
public class SignatureUtil {

	static public String getSignature(String... list) {
		List<String> strList = new ArrayList<String>();
		
		for (String item:list) {
			strList.add(item);
		}
		String mList[] = new String[strList.size()];
		for (int i = 0; i < strList.size(); i++) {
			mList[i] = strList.get(i);
		}
		Arrays.sort(mList);
		String str = "";
		for (int i = 0; i < strList.size(); i++) {
			str += mList[i];
		}
		MD5 md5 = new MD5();
		return md5.getMD5ofStr(str).toLowerCase();
	}
	
}
